<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2024/4/30
 * Time: 9:12
 */

namespace plugin\admin\app\logic\user;


use app\common\lib\Guzzle;
use plugin\admin\app\logic\BaseLogic;
use plugin\admin\app\model\user\UserPlatformAccountModel;
use plugin\admin\app\model\user\UserSpreadKeywordModel;
use support\Cache;
use support\Request;
use support\Response;

class PlatformAccountLogic extends BaseLogic
{
    protected static $instance;

    public function __construct()
    {
        $this->model = new UserPlatformAccountModel();
    }

    public static function getInstance()
    {
        //        if(is_object(self::$instance)){
//            return self::$instance;
//        }

        return new self();
    }

    public function select(Request $request): Response
    {
        $field = $request->input('field');
        if($field==false){
            $request->inputSet('field','created_at');
            $request->inputSet('order','desc');
        }

        //$request->inputSet('isdel','0');
        return parent::select($request);
    }

    protected function formatNormal($items, $total): Response
    {
        foreach($items as &$val){
        }
        return parent::formatNormal($items, $total);
    }

}